<div class="col-sm-12">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>修改菜单</h5>

        </div>
        <div class="ibox-content">
            <form method="post" action="update?id={$model.id}" class="form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">菜单名称：</label>
                        <div class="col-sm-9">
                            <input required type="text" value="{$model.name}" name="name" class="form-control" placeholder=""> <span class="help-block m-b-none">建议不超过六个字</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">父级栏目：</label>
                        <div class="col-sm-9">

                            <select  class="form-control" name="parent_id" id="parent_id" >

                                <option value="0">顶级菜单</option>

                                {volist name="menuList" id="id"}
                                {if $model.parent_id==$id.id}
                                    <option selected value="{$id.id}">{$id.name}</option>
                                {else}
                                    <option value="{$id.id}">{$id.name}</option>
                                {/if}
                                {/volist}
                                {/if}
                            </select>

                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">模块：</label>
                        <div class="col-sm-9">
                            <input type="text" name="m_name" value="{$model.m_name}" class="form-control" placeholder="admin"> <span class="help-block m-b-none">小写即可，后台管理默认为admin。</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">控制器：</label>
                        <div class="col-sm-9">
                            <input type="text"  name="c_name" value="{$model.c_name}" class="form-control" placeholder="index"> <span class="help-block m-b-none">小写即可</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">方法：</label>
                        <div class="col-sm-9">
                            <input type="text" name="a_name" value="{$model.a_name}" class="form-control" placeholder="index"> <span class="help-block m-b-none">小写即可</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">筛选条件：</label>
                        <div class="col-sm-9">
                            <input type="text" name="condition" value="{$model.condition}" class="form-control" placeholder=""> <span class="help-block m-b-none">运营人员请勿用此选项</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">fontawesome图标：</label>
                        <div class="col-sm-9">
                            <input type="text" name="icon" value="{$model.icon}" class="form-control" placeholder="fa-home">
                            <span class="help-block m-b-none">现在图标{if $model.icon}<i class="fa {$model.icon}"></i>{/if}  <a target="_blank" href="http://fontawesome.io/icons/">参考</a></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-2">
                            <button class="btn btn-primary btn-sm" type="submit">保存修改</button>
                            <a class="btn btn-white" href="/admin/menu/index">取消</a>
                        </div>
                    </div>
            </form>
        </div>
    </div>
</div>
<script>

    $(function(){
        $('input[type=radio][name=isFirst]').change(function() {
            if (this.value) {
                // alert("Allot Thai Gayo Bhai");
                // $('#parent_id').attr("disabled",false);
                document.getElementById('parent_id').disabled = false
            }
            else{
                document.getElementById('parent_id').disabled = true
                // $('#parent_id').attr("disabled",true);
                // alert("Transfer Thai Gayo");
            }
        });
    })
</script>